/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.max.oti.system.service.implement;

import com.max.oti.system.dao.interfac.IPracticeDao;
import com.max.oti.system.model.Practice;
import com.max.oti.system.service.interfac.IPracticeService;
import java.io.Serializable;
import java.util.List;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Disjunction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

/**
 *
 * @author Alberto
 */

public class PracticeService implements IPracticeService {
@Autowired
    @Qualifier("practiceDao")
    IPracticeDao practiceDao;

    @Override
    public int save(Practice object) throws Exception {
        return practiceDao.save(object);
    }

    @Override
    public void update(Practice object) throws Exception {
        practiceDao.update(object);
        }

    @Override
    public void saveOrUpdate(Practice object) throws Exception {
        practiceDao.saveOrUpdate(object);
        }

    @Override
    public void delete(Practice object) throws Exception {
        practiceDao.delete(object);
        }

    @Override
    public Practice getById(Serializable id) throws Exception {
        return practiceDao.getById(id);
        }
    @Override
    public Practice load(Serializable id) throws Exception {
        return practiceDao.load(id);
    }
    @Override
    public List list() throws Exception {
        return practiceDao.list();
    }

    @Override
    public List listHQL(String hql, Class clazz) throws Exception {
        return practiceDao.listHQL(hql, clazz);
    }

    @Override
    public List listHQL(String hql) throws Exception {
    return practiceDao.listHQL(hql);
    }

    @Override
    public int HQLexecute(String hql) throws Exception {
        return practiceDao.HQLexecute(hql);}

    @Override
    public int SQLexecute(String SQL) throws Exception {
        return practiceDao.SQLexecute(SQL);}

    @Override
    public List listHQL(String HQL, int firstResult, int maxResult) throws Exception {
        return practiceDao.listHQL(HQL);}

    @Override
    public List listCriterion(List<Criterion> listCriterion) {
        return practiceDao.listCriterion(listCriterion);}

    @Override
    public List listHQL(String hql, int lazyChargeOption) throws Exception {
        return practiceDao.listHQL(hql, lazyChargeOption);
    }

    @Override
    public List listCriterion(List<Criterion> listCriterion, String[] alias, Disjunction disjunction) throws Exception {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
}
